<?php
/**
 * Created by PhpStorm.
 * User: zhan
 * Date: 2018/1/2  14:20
 */
namespace app\api\controller;
class Shop extends Base
{
    //检查权限作用域
    protected $beforeActionList = [
        'checkPrimaryScope' => [
            'only' => 'detail,collect,capital_flow'
        ]
    ];

    /**
     * 店铺列表
     */
    public function index()
    {
        $result =  (new \app\api\logic\Shop())->index();
        return $this->ajaxReturn($result);
    }
    /**
     * 店铺详情
     */
    public function detail()
    {
        $result =  (new \app\api\logic\Shop())->detail();
        return $this->ajaxReturn($result);
    }
    /**
    *   店铺分类
    */
    public function category()
    {
        $result =  (new \app\api\logic\Shop())->category();
        return $this->ajaxReturn($result);
    }
    /**
    *   店铺分类详情
    */
    public function category_detail()
    {
        $result =  (new \app\api\logic\Shop())->category_detail();
        return $this->ajaxReturn($result);
    }
    /**
     * 店铺评论
     */
    public function comment()
    {
        $result =  (new \app\api\logic\Shop())->comment();
        return $this->ajaxReturn($result);
    }
    /**
     * 店铺信息
     */
    public function info()
    {
        $result =  (new \app\api\logic\Shop())->info();
        return $this->ajaxReturn($result);
    }
    /**
     * 店铺资质
     */
    public function qualifications()
    {

        $result =  (new \app\api\logic\Shop())->qualifications();
        return $this->ajaxReturn($result);
    }
    /**
     * 店铺收藏与取消
     */
    public function collect()
    {

        $result =  (new \app\api\logic\Shop())->collect();
        return $this->ajaxReturn($result);
    }
    /**
    *   资金流水
    */
    public function capital_flow(){
        $result =  (new \app\api\logic\Shop())->capital_flow();
        return $this->ajaxReturn($result);
    }
}